<template>
	<view >
		<!-- 顶部操作条 -->
		<!-- 	<view class="cu-bar bg-white">
		<view class="action">
			<text class="cuIcon-back text-gray"></text> 返回
		</view>
		<view class="content text-bold">
			操作条
		</view>
		<view class="action">
			<text class="cuIcon-cardboardfill text-grey"></text>
			<text class="cuIcon-recordfill text-red"></text>
		</view>
	</view> -->

		<!-- 图片展示 -->
		<view>
			<cu-custom bgColor="bg-gradual-pink" :isBack="true" backRouterName="index">
				<block slot="backText">返回</block>
				<block slot="content">支付详情</block>

			</cu-custom>
		
<!-- 
			<view class="cu-card case ">
				<view class="cu-item shadow">
					<view class="image">
						<image
							:src="goodsInfo.goodsImg"></image>

					</view>
					<view class="flex solid-bottom justify-between   p-xs margin-bottom-sm mb-sm">
						<view class=" cu-item ">

							<view class="flex-sub ">

								<view class=" text-center  text-lg  text-black text-shadow text-bold ">
									<view class="  padding ">
										<text class="text-teal ">{{goodsInfo.goodName}}</text>
										
									</view>
									
								</view>
							</view>
						</view>


					</view>

				</view>
			</view> -->

			

		</view>
		<view class="cu-list menu-avatar xl">
			
			<view class="cu-item xxl">
				<view class="cu-avatar lg" :style="'background-image:url('+goodsInfo.goodsImg+');'">
					<!-- <view class="cu-tag badge"></view> -->
				</view>
				<view class="content">
					<view class="text-grey">
						<view class="text-cut">{{goodsInfo.goodName}}</view>
						<view class="cu-tag bg-orange sm">史诗</view>
					</view>
				
				</view>
				<view class="action">
					<view class="text-grey text-xs">抢购份数</view>
					<view class=" text-gray">x1</view>
				</view>
			</view>
			
		</view>
		<radio-group class="block margin-top" @change="RadioChange">
			<view class="cu-form-group ">
				<view class="cuIcon-rechargefill text-blue title"><text class="title padding-left-sm">支付宝支付</text></view>
				<radio :class="radio=='A'?'checked':''" :checked="radio=='A'?true:false" value="A"></radio>
			</view>
		<view class="cu-form-group ">
			<view class="cuIcon-weixin text-green  xl"><text class="title padding-left-sm">微信支付</text></view>
			<radio :class="radio=='B'?'checked':''" :checked="radio=='B'?true:false" value="B"></radio>
		</view>
				<view class="cu-form-group ">
					<view class="title">余额支付</view>
					<radio class="grey" :disabled ="true" ></radio>
				</view>
						
		</radio-group>
		<view class="ljgm margin-top">
			<view class="cu-bar bg-white tabbar border shop">
				<button class="action" open-type="contact">
				
					<view class="solid-bottom text-xxl padding">
						<text class="text-price text-red">{{goodsInfo.price}}</text>
					</view>
				</button>

				<view class="btn-group-right">
					<button class="cu-btn bg-red round shadow-blur">立即支付</button>
				</view>
			</view>
		</view>
		<!-- 作品介绍 -->
	</view>
</template>

<script>
	import apiService from '@/api/api.js';
	import dateUtil from '@/common/util/dateUtil.js';
	export default {
		data() {
			return {
				musicState: true,
				goodsInfo: {},
				authorInfo: {},
				showBuyText: null,
				showBuy: false,
				timer:''
			}
		},
		onLoad() {
			this.getGoodInfo();
			this.routeParam = this.$route.query;
			console.log("this.routeParam>>>", this.routeParam)
			this.getTime()
		},
		// 离开页面
		onUnload() {
		  this.stopTimer()
		},
		methods: {

			state() {
				if (this.musicState) {
					this.musicState = false
				} else {
					this.musicState = true
				}
			},
			getGoodInfo() {
				var resultList = []
				var param = {
					id: this.$route.query.id
				}
				apiService.mQueryGoodInfoById(param).then(res => {
					console.log("res::", res)
					if (res.data.success) {
						this.authorInfo = res.data.result.authorInfo
						this.goodsInfo = res.data.result.goodsInfo
						// console.log("this.msgCount", this.msgCount)
					}
				})
			}


		}
	}
</script>

<style>

 </style>
